package service;

import domain.Article;
import domain.Favour;
import domain.PageBean;
import domain.User;

public interface UserService {
    /**
     * 注册用户
     *
     * @param user
     * @param createTime
     * @return
     */
    boolean regist(User user, String createTime);

    boolean active(String code);

    User login(User user);

    User findOneByCode(String code);

    int findArticleNumByCode(String code);

    int updateNickNameByCode(String code, String nickname);

    int updatePasswordByCode(String code, String password);

    Article setArticle(int cid, String visible, String title, String text, String createTime, String code);

    int setLabel(String code, int rid, String[] tags);

    PageBean findArticleByPage(String currentPage, String rows, String code);

    void deleteArticle(int rid);

    void delSelectedArticleById(String[] rds);

    Article findArticleByRid(int parseInt);

    void updateArticle(int parseInt, String title, String text, String modifyTime, String visible);

    void deleteArticleFromRecycle(int parseInt);

    PageBean findArticleByPageFromRecycle(String currentPage, String rows, String code);

    void delSelectedArticleFromRecycle(String[] rds);

    Favour findLikeOrNot(String code, int rid);

    void addFavour(String code, int rid);

    void updateImage(String code, String image);

    void recoverArticleByRid(int parseInt);

}
